<?php
	####################################################
	# library import and object instance.              #
	####################################################
	# 공통 파일을 인클루드 한다.
	include_once( './common.php' );

	####################################################
	# request data($_POST AND $_GET FROM $_REQUEST)    #
	####################################################
	# REQUEST(get and post variables)
	//$req = Request::clean_request($_REQUEST, FALSE);

	# GET(url variables)
	$gfname = $_GET['fname'];

	# POST(form variables)

	# Validation(special case validate)

	####################################################
	# implementation                                   #
	####################################################
	$sec->run();

	if($gfname != ""){
		echo "다운로드";
		IoFileAndDir::force_download("./attach/",$gfname);
	}

?>
<?php
	# HTML START
	echo $html->custom_header(TITLE);
	echo $tplt->page_construct_javascript();
	echo $html->custom_js("{$JS}common.js");
	echo $html->custom_css("{$CSS}common.css");
	echo $html->custom_body();
?>
	<?php //$tplt->app_head($NAVI)?>
	<?php //$tplt->tiles_admin_sidebar($NAVI)?>
	<?php //$tplt->tiles_admin_contents($pkname, $pname, $pdesc)?>

	<a href="ntdd.forcedownload.test?fname=test.download">연결</a>
	<a href="ntdd.forcedownload.test?fname=test.php">연결</a>

<?php
	# HTML END
	//echo $tplt->tiles_admin_footer();
	echo $tplt->page_destruct_javascript();
	include_once('./endproc.php');
	echo $html->html_footer();
?>